import org.apache.spark.sql.SparkSession

object rdd2 {
  def main(args: Array[String]): Unit = {
    // 创建 SparkSession
    val spark = SparkSession.builder()
      .appName("Test")
      .master("local[*]")
      .getOrCreate()
    val sc = spark.sparkContext
    try {
      //从内存中读取数据创建RDD--parallelize()
      // 1. 定义数据
     val first_half = sc.textFile("D:\\Employee_salary_second_half.csv")
      val second_half = sc.textFile("D:\\Employee_salary_first_half.csv")
    } finally {
      // 停止 SparkSession
      spark.stop()
    }
  }
}
